CREATE TABLE [dbo].[TDCAAB_DOXC]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[TI_PLAN] [dbo].[TD_VC_001] NOT NULL,
[NU_PLAN] [dbo].[TD_VC_008] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCAAB_DO__NU_SE__1293BD5E] DEFAULT ((0)),
[NU_CORR] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCAAB_DO__NU_CO__1387E197] DEFAULT ((0)),
[CO_BANC] [dbo].[TD_VC_003] NOT NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NOT NULL,
[TI_MOVI_BANC] [dbo].[TD_VC_001] NOT NULL,
[NU_COMP_BANC] [dbo].[TD_VC_008] NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NU_DOCU_BANC] [dbo].[TD_VC_020] NOT NULL,
[FE_OPER] [dbo].[TD_DT_001] NOT NULL,
[FA_TIPO_CAMB] [dbo].[TD_NU_015_006] NULL,
[TI_ENTI] [dbo].[TD_VC_001] NULL,
[CO_ENTI] [dbo].[TD_VC_020] NULL,
[CO_TIPO_OPER] [dbo].[TD_VC_003] NULL,
[CO_UNID_CNTB] [dbo].[TD_VC_003] NULL,
[IM_SALD] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCAAB_DO__IM_SA__147C05D0] DEFAULT ((0)),
[IM_DETA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCAAB_DO__IM_DE__15702A09] DEFAULT ((0)),
[IM_DETA_NEGA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCAAB_DO__IM_DE__16644E42] DEFAULT ((0)),
[IM_CONV_DOCU] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCAAB_DO__IM_CO__1758727B] DEFAULT ((0)),
[ST_CIER_DOCU] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TDCAAB_DO__ST_CI__184C96B4] DEFAULT ('N'),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCAAB_DO__CO_US__1A34DF26] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCAAB_DO__FE_US__1B29035F] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCAAB_DO__CO_US__1C1D2798] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCAAB_DO__FE_US__1D114BD1] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCAAB_DOXC] WITH NOCHECK ADD CONSTRAINT [CK__TDCAAB_DO__ST_CI__1940BAED] CHECK NOT FOR REPLICATION (([ST_CIER_DOCU]='N' OR [ST_CIER_DOCU]='S'))
GO
ALTER TABLE [dbo].[TDCAAB_DOXC] ADD CONSTRAINT [PK__TDCAAB_D__4A15CDDA7BFB3C20] PRIMARY KEY CLUSTERED  ([CO_EMPR], [TI_PLAN], [NU_PLAN], [NU_SECU], [NU_CORR]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCAAB_DOXC] ADD CONSTRAINT [FK__TDCAAB_DOXC__2B9540A9] FOREIGN KEY ([CO_EMPR], [TI_PLAN], [NU_PLAN], [NU_SECU]) REFERENCES [dbo].[TDPLAN_DOXC] ([CO_EMPR], [TI_PLAN], [NU_PLAN], [NU_SECU])
GO
